import Vue from 'vue'
import VueRouter from 'vue-router'

import filmRoutes from './modules/films'
import cinemasRoutes from './modules/cinemas'
import newsRoutes from "./modules/news";
import centerRoutes from "./modules/center";
import cityRoutes from './modules/city'


Vue.use(VueRouter)

const routes = [
    // 路由重定项
    {
        path: "/",
        redirect: "/films/nowPlaying",
    },

    // 城市列表
    ...cityRoutes,
    // 电影模块
    ...filmRoutes,
    // 电影院模块
    ...cinemasRoutes,
    // 资讯模块
    ...newsRoutes,
    // 我的模块
    ...centerRoutes,

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router